package leetcodecompetition.D362;

import java.util.Arrays;
import java.util.List;

/**
 * @Author: Siantar
 * @Date: 2023-09-10-10:31
 * @Description: 1.0
 */
public class T8029 {
    public int numberOfPoints(List<List<Integer>> nums) {
        int []ds=new int[101];
        for(List<Integer> list:nums){
            int start=list.get(0);
            int end=list.get(1);
            for (int i = start; i <=end ; i++) {
                ds[i]=1;
            }
        }
        return  Arrays.stream(ds).sum();
    }
}
